// Copyright (c) 2023 Presto Labs Pte. Ltd.
// Author: ziyan
#pragma once
#include <memory>
#include <string>

#include <boost/uuid/uuid_generators.hpp>
#include <glog/logging.h>

#include "coin2/exchange/base/executor/live_executor.h"
#include "coin2/exchange/base/feed/ws/feed_subscription_spec.h"
#include "coin2/exchange/base/feed/ws/ws_connection.h"
#include "coin2/exchange/base/market/market_exchange_api.h"

namespace coin2::exchange::base::feed {
namespace impl {
class BittrexConnection : public WsConnection {
 public:
  BittrexConnection(const WsConnectionConfig& config,
                   std::function<void()> fail_callback,
                   executor::LiveAsyncExecutor* exec,
                   RequestGenerator* request_generator,
                   std::shared_ptr<LatencyExtractor> latency_extractor,
                   bool enable_telemetry);

  ~BittrexConnection();

  void Run(boost::asio::yield_context yield) override;
 private:
  std::string GetFullPath();
};

}  // namespace impl

using impl::BittrexConnection;

}  // namespace coin2::exchange::base::feed
